home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xml-rpc / nsIXmlRpcClient.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  16KB  |  433 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIXmlRpcClient.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIXmlRpcClient_h__
  6. #define __gen_nsIXmlRpcClient_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIURL_h__
  14. #include "nsIURL.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsIXmlRpcClientListener_h__
  18. #include "nsIXmlRpcClientListener.h"
  19. #endif
  20.  
  21. /* For IDL files that don't want to include root IDL files. */
  22. #ifndef NS_NO_VTABLE
  23. #define NS_NO_VTABLE
  24. #endif
  25. class nsIXmlRpcFault; /* forward declaration */
  26.  
  27.  
  28. /* starting interface:    nsIXmlRpcClient */
  29. #define NS_IXMLRPCCLIENT_IID_STR "37127241-1e6e-46aa-ba87-601d41bb47df"
  30.  
  31. #define NS_IXMLRPCCLIENT_IID \
  32.   {0x37127241, 0x1e6e, 0x46aa, \
  33.     { 0xba, 0x87, 0x60, 0x1d, 0x41, 0xbb, 0x47, 0xdf }}
  34.  
  35. class NS_NO_VTABLE nsIXmlRpcClient : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXMLRPCCLIENT_IID)
  39.  
  40.   /**
  41.  * Simple XML-RPC client interface.
  42.  */
  43. /**
  44.      * Set server URL. Call this before using this object.
  45.      *
  46.      * @param serverURL URL of server side object on which methods should
  47.      *                  be called.
  48.      */
  49.   /* void init (in string serverURL); */
  50.   NS_IMETHOD Init(const char *serverURL) = 0;
  51.  
  52.   /**
  53.      * Set authentication info if needed.  Both parameters must be
  54.      * specified for authentication to be enabled.
  55.      *
  56.      * @param username  username to be used if asked to authenticate
  57.      * @param password  password to be used if asked to authenticate
  58.      */
  59.   /* void setAuthentication (in string username, in string password); */
  60.   NS_IMETHOD SetAuthentication(const char *username, const char *password) = 0;
  61.  
  62.   /**
  63.      * Clear authentication info.
  64.      */
  65.   /* void clearAuthentication (in string username, in string password); */
  66.   NS_IMETHOD ClearAuthentication(const char *username, const char *password) = 0;
  67.  
  68.   /**
  69.      * The URL of the XML-RPC server
  70.      */
  71.   /* readonly attribute nsIURL serverURL; */
  72.   NS_IMETHOD GetServerURL(nsIURL * *aServerURL) = 0;
  73.  
  74.   /**
  75.      * Call remote method methodName asynchronously with given arguments.
  76.      * 
  77.      * Supported arguments are:
  78.      * nsISupportsPRUint8, nsISupportsPRUint16,
  79.      * nsISupportsPRInt16, nsISupportsPRInt32: <i4>
  80.      * nsISupportsPRBool: <boolean>
  81.      * nsISupportsChar, nsISupportsCString: <string>
  82.      * nsISupportsFloat, nsISupportsDouble: <double>
  83.      * nsISupportsPRTime: <dateTime.iso8601>
  84.      * nsIInputStream: <base64>
  85.      * nsISupportsArray: <array>
  86.      * nsIDictionary: <struct>
  87.      *
  88.      * Note that both nsISupportsArray and nsIDictionary can only hold any of
  89.      * the supported input types.
  90.      *
  91.      * Return value will be converted as follows:
  92.      * <i4> or <int>: nsISupportsPRInt32
  93.      * <boolean>: nsISupportsPRBool
  94.      * <string>: nsISupportsCString
  95.      * <double>: nsISupportsDouble
  96.      * <dateTime.iso8601>: nsISupportsPRTime
  97.      * <base64>: nsISupportsCString
  98.      * <array>: nsISupportsArray
  99.      * <struct>: nsIDictionary
  100.      *
  101.      * <fault>s (server side errors) are indicated by returning
  102.      * NS_ERROR_FAILURE. Via nsIXPConnect::GetPendingException()->data a
  103.      * nsIXmlRpcFault object can be retreieved with more information on the
  104.      * fault.
  105.      *
  106.      * @param listener          A nsIXmlRpcClientListener that will get notified
  107.      *                          of XML-RPC events.
  108.      * @param context           A context to be passed on to the listener.
  109.      * @param methodName        Remote method to call.
  110.      * @param arguments         Array of arguments to pass to remote method.
  111.      * @return                  Return value of remote method.
  112.      */
  113.   /* void asyncCall (in nsIXmlRpcClientListener listener, in nsISupports ctxt, in string methodName, [array, size_is (count)] in nsISupports arguments, in PRUint32 count); */
  114.   NS_IMETHOD AsyncCall(nsIXmlRpcClientListener *listener, nsISupports *ctxt, const char *methodName, nsISupports **arguments, PRUint32 count) = 0;
  115.  
  116.   /**
  117.      * Wether or not a call is in progress
  118.      */
  119.   /* readonly attribute boolean inProgress; */
  120.   NS_IMETHOD GetInProgress(PRBool *aInProgress) = 0;
  121.  
  122.   /**
  123.      * The most recent XML-RPC fault from returned from this server.
  124.      * null if the last call didn't return an XML-RPC fault.
  125.      */
  126.   /* readonly attribute nsIXmlRpcFault fault; */
  127.   NS_IMETHOD GetFault(nsIXmlRpcFault * *aFault) = 0;
  128.  
  129.   /**
  130.      * The most recent XML-RPC call result returned from this server.
  131.      * null if the last call didn't return a valid result
  132.      */
  133.   /* readonly attribute nsISupports result; */
  134.   NS_IMETHOD GetResult(nsISupports * *aResult) = 0;
  135.  
  136.   /**
  137.      * The most recent HTTP status code returned from this server
  138.      * null if the server was unreachable or not yet contacted.
  139.      */
  140.   /* readonly attribute unsigned long responseStatus; */
  141.   NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus) = 0;
  142.  
  143.   /* readonly attribute unsigned long responseString; */
  144.   NS_IMETHOD GetResponseString(PRUint32 *aResponseString) = 0;
  145.  
  146.   /**
  147.      * Convenience: return the correct nsISupportsPrimitive for a given XML-RPC
  148.      * type, or nsISupportsArray or nsIDictionary.  'base64' isn't supported.
  149.      * No QueryInterface call is needed, the object has been QueryInterfaced to
  150.      * the correct interface.
  151.      *
  152.      * @param type              One of the listed constants.
  153.      * @param uuid              The uuid of the returned object. No QI call 
  154.      *                          needed.
  155.      * @param nsQIResult        The apropriate XPCOM object.
  156.      */
  157.   /* void createType (in unsigned long type, out nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
  158.   NS_IMETHOD CreateType(PRUint32 type, nsIID & *uuid, void * *result) = 0;
  159.  
  160.   enum { INT = 1U };
  161.  
  162.   enum { BOOLEAN = 2U };
  163.  
  164.   enum { STRING = 3U };
  165.  
  166.   enum { DOUBLE = 4U };
  167.  
  168.   enum { DATETIME = 5U };
  169.  
  170.   enum { ARRAY = 6U };
  171.  
  172.   enum { STRUCT = 7U };
  173.  
  174. };
  175.  
  176. /* Use this macro when declaring classes that implement this interface. */
  177. #define NS_DECL_NSIXMLRPCCLIENT \
  178.   NS_IMETHOD Init(const char *serverURL); \
  179.   NS_IMETHOD SetAuthentication(const char *username, const char *password); \
  180.   NS_IMETHOD ClearAuthentication(const char *username, const char *password); \
  181.   NS_IMETHOD GetServerURL(nsIURL * *aServerURL); \
  182.   NS_IMETHOD AsyncCall(nsIXmlRpcClientListener *listener, nsISupports *ctxt, const char *methodName, nsISupports **arguments, PRUint32 count); \
  183.   NS_IMETHOD GetInProgress(PRBool *aInProgress); \
  184.   NS_IMETHOD GetFault(nsIXmlRpcFault * *aFault); \
  185.   NS_IMETHOD GetResult(nsISupports * *aResult); \
  186.   NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus); \
  187.   NS_IMETHOD GetResponseString(PRUint32 *aResponseString); \
  188.   NS_IMETHOD CreateType(PRUint32 type, nsIID & *uuid, void * *result); \
  189.  
  190. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  191. #define NS_FORWARD_NSIXMLRPCCLIENT(_to) \
  192.   NS_IMETHOD Init(const char *serverURL) { return _to Init(serverURL); } \
  193.   NS_IMETHOD SetAuthentication(const char *username, const char *password) { return _to SetAuthentication(username, password); } \
  194.   NS_IMETHOD ClearAuthentication(const char *username, const char *password) { return _to ClearAuthentication(username, password); } \
  195.   NS_IMETHOD GetServerURL(nsIURL * *aServerURL) { return _to GetServerURL(aServerURL); } \
  196.   NS_IMETHOD AsyncCall(nsIXmlRpcClientListener *listener, nsISupports *ctxt, const char *methodName, nsISupports **arguments, PRUint32 count) { return _to AsyncCall(listener, ctxt, methodName, arguments, count); } \
  197.   NS_IMETHOD GetInProgress(PRBool *aInProgress) { return _to GetInProgress(aInProgress); } \
  198.   NS_IMETHOD GetFault(nsIXmlRpcFault * *aFault) { return _to GetFault(aFault); } \
  199.   NS_IMETHOD GetResult(nsISupports * *aResult) { return _to GetResult(aResult); } \
  200.   NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus) { return _to GetResponseStatus(aResponseStatus); } \
  201.   NS_IMETHOD GetResponseString(PRUint32 *aResponseString) { return _to GetResponseString(aResponseString); } \
  202.   NS_IMETHOD CreateType(PRUint32 type, nsIID & *uuid, void * *result) { return _to CreateType(type, uuid, result); } \
  203.  
  204. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  205. #define NS_FORWARD_SAFE_NSIXMLRPCCLIENT(_to) \
  206.   NS_IMETHOD Init(const char *serverURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(serverURL); } \
  207.   NS_IMETHOD SetAuthentication(const char *username, const char *password) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAuthentication(username, password); } \
  208.   NS_IMETHOD ClearAuthentication(const char *username, const char *password) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearAuthentication(username, password); } \
  209.   NS_IMETHOD GetServerURL(nsIURL * *aServerURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServerURL(aServerURL); } \
  210.   NS_IMETHOD AsyncCall(nsIXmlRpcClientListener *listener, nsISupports *ctxt, const char *methodName, nsISupports **arguments, PRUint32 count) { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncCall(listener, ctxt, methodName, arguments, count); } \
  211.   NS_IMETHOD GetInProgress(PRBool *aInProgress) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInProgress(aInProgress); } \
  212.   NS_IMETHOD GetFault(nsIXmlRpcFault * *aFault) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFault(aFault); } \
  213.   NS_IMETHOD GetResult(nsISupports * *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResult(aResult); } \
  214.   NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseStatus(aResponseStatus); } \
  215.   NS_IMETHOD GetResponseString(PRUint32 *aResponseString) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseString(aResponseString); } \
  216.   NS_IMETHOD CreateType(PRUint32 type, nsIID & *uuid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateType(type, uuid, result); } \
  217.  
  218. #if 0
  219. /* Use the code below as a template for the implementation class for this interface. */
  220.  
  221. /* Header file */
  222. class nsXmlRpcClient : public nsIXmlRpcClient
  223. {
  224. public:
  225.   NS_DECL_ISUPPORTS
  226.   NS_DECL_NSIXMLRPCCLIENT
  227.  
  228.   nsXmlRpcClient();
  229.  
  230. private:
  231.   ~nsXmlRpcClient();
  232.  
  233. protected:
  234.   /* additional members */
  235. };
  236.  
  237. /* Implementation file */
  238. NS_IMPL_ISUPPORTS1(nsXmlRpcClient, nsIXmlRpcClient)
  239.  
  240. nsXmlRpcClient::nsXmlRpcClient()
  241. {
  242.   /* member initializers and constructor code */
  243. }
  244.  
  245. nsXmlRpcClient::~nsXmlRpcClient()
  246. {
  247.   /* destructor code */
  248. }
  249.  
  250. /* void init (in string serverURL); */
  251. NS_IMETHODIMP nsXmlRpcClient::Init(const char *serverURL)
  252. {
  253.     return NS_ERROR_NOT_IMPLEMENTED;
  254. }
  255.  
  256. /* void setAuthentication (in string username, in string password); */
  257. NS_IMETHODIMP nsXmlRpcClient::SetAuthentication(const char *username, const char *password)
  258. {
  259.     return NS_ERROR_NOT_IMPLEMENTED;
  260. }
  261.  
  262. /* void clearAuthentication (in string username, in string password); */
  263. NS_IMETHODIMP nsXmlRpcClient::ClearAuthentication(const char *username, const char *password)
  264. {
  265.     return NS_ERROR_NOT_IMPLEMENTED;
  266. }
  267.  
  268. /* readonly attribute nsIURL serverURL; */
  269. NS_IMETHODIMP nsXmlRpcClient::GetServerURL(nsIURL * *aServerURL)
  270. {
  271.     return NS_ERROR_NOT_IMPLEMENTED;
  272. }
  273.  
  274. /* void asyncCall (in nsIXmlRpcClientListener listener, in nsISupports ctxt, in string methodName, [array, size_is (count)] in nsISupports arguments, in PRUint32 count); */
  275. NS_IMETHODIMP nsXmlRpcClient::AsyncCall(nsIXmlRpcClientListener *listener, nsISupports *ctxt, const char *methodName, nsISupports **arguments, PRUint32 count)
  276. {
  277.     return NS_ERROR_NOT_IMPLEMENTED;
  278. }
  279.  
  280. /* readonly attribute boolean inProgress; */
  281. NS_IMETHODIMP nsXmlRpcClient::GetInProgress(PRBool *aInProgress)
  282. {
  283.     return NS_ERROR_NOT_IMPLEMENTED;
  284. }
  285.  
  286. /* readonly attribute nsIXmlRpcFault fault; */
  287. NS_IMETHODIMP nsXmlRpcClient::GetFault(nsIXmlRpcFault * *aFault)
  288. {
  289.     return NS_ERROR_NOT_IMPLEMENTED;
  290. }
  291.  
  292. /* readonly attribute nsISupports result; */
  293. NS_IMETHODIMP nsXmlRpcClient::GetResult(nsISupports * *aResult)
  294. {
  295.     return NS_ERROR_NOT_IMPLEMENTED;
  296. }
  297.  
  298. /* readonly attribute unsigned long responseStatus; */
  299. NS_IMETHODIMP nsXmlRpcClient::GetResponseStatus(PRUint32 *aResponseStatus)
  300. {
  301.     return NS_ERROR_NOT_IMPLEMENTED;
  302. }
  303.  
  304. /* readonly attribute unsigned long responseString; */
  305. NS_IMETHODIMP nsXmlRpcClient::GetResponseString(PRUint32 *aResponseString)
  306. {
  307.     return NS_ERROR_NOT_IMPLEMENTED;
  308. }
  309.  
  310. /* void createType (in unsigned long type, out nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
  311. NS_IMETHODIMP nsXmlRpcClient::CreateType(PRUint32 type, nsIID & *uuid, void * *result)
  312. {
  313.     return NS_ERROR_NOT_IMPLEMENTED;
  314. }
  315.  
  316. /* End of implementation class template. */
  317. #endif
  318.  
  319.  
  320. /* starting interface:    nsIXmlRpcFault */
  321. #define NS_IXMLRPCFAULT_IID_STR "691cb864-0a7e-448c-98ee-4a7f359cf145"
  322.  
  323. #define NS_IXMLRPCFAULT_IID \
  324.   {0x691cb864, 0x0a7e, 0x448c, \
  325.     { 0x98, 0xee, 0x4a, 0x7f, 0x35, 0x9c, 0xf1, 0x45 }}
  326.  
  327. class NS_NO_VTABLE nsIXmlRpcFault : public nsISupports {
  328.  public: 
  329.  
  330.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXMLRPCFAULT_IID)
  331.  
  332.   /**
  333.  * An XML-RPC exception.
  334.  * XML-RPC server fault codes are returned wrapped in this Access via
  335.  * nsIXPConnect::GetPendingException()->data
  336.  */
  337.   /* readonly attribute PRInt32 faultCode; */
  338.   NS_IMETHOD GetFaultCode(PRInt32 *aFaultCode) = 0;
  339.  
  340.   /* readonly attribute string faultString; */
  341.   NS_IMETHOD GetFaultString(char * *aFaultString) = 0;
  342.  
  343.   /* void init (in PRInt32 faultCode, in string faultString); */
  344.   NS_IMETHOD Init(PRInt32 faultCode, const char *faultString) = 0;
  345.  
  346.   /* string toString (); */
  347.   NS_IMETHOD ToString(char **_retval) = 0;
  348.  
  349. };
  350.  
  351. /* Use this macro when declaring classes that implement this interface. */
  352. #define NS_DECL_NSIXMLRPCFAULT \
  353.   NS_IMETHOD GetFaultCode(PRInt32 *aFaultCode); \
  354.   NS_IMETHOD GetFaultString(char * *aFaultString); \
  355.   NS_IMETHOD Init(PRInt32 faultCode, const char *faultString); \
  356.   NS_IMETHOD ToString(char **_retval); 
  357.  
  358. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  359. #define NS_FORWARD_NSIXMLRPCFAULT(_to) \
  360.   NS_IMETHOD GetFaultCode(PRInt32 *aFaultCode) { return _to GetFaultCode(aFaultCode); } \
  361.   NS_IMETHOD GetFaultString(char * *aFaultString) { return _to GetFaultString(aFaultString); } \
  362.   NS_IMETHOD Init(PRInt32 faultCode, const char *faultString) { return _to Init(faultCode, faultString); } \
  363.   NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); } 
  364.  
  365. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  366. #define NS_FORWARD_SAFE_NSIXMLRPCFAULT(_to) \
  367.   NS_IMETHOD GetFaultCode(PRInt32 *aFaultCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFaultCode(aFaultCode); } \
  368.   NS_IMETHOD GetFaultString(char * *aFaultString) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFaultString(aFaultString); } \
  369.   NS_IMETHOD Init(PRInt32 faultCode, const char *faultString) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(faultCode, faultString); } \
  370.   NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } 
  371.  
  372. #if 0
  373. /* Use the code below as a template for the implementation class for this interface. */
  374.  
  375. /* Header file */
  376. class nsXmlRpcFault : public nsIXmlRpcFault
  377. {
  378. public:
  379.   NS_DECL_ISUPPORTS
  380.   NS_DECL_NSIXMLRPCFAULT
  381.  
  382.   nsXmlRpcFault();
  383.  
  384. private:
  385.   ~nsXmlRpcFault();
  386.  
  387. protected:
  388.   /* additional members */
  389. };
  390.  
  391. /* Implementation file */
  392. NS_IMPL_ISUPPORTS1(nsXmlRpcFault, nsIXmlRpcFault)
  393.  
  394. nsXmlRpcFault::nsXmlRpcFault()
  395. {
  396.   /* member initializers and constructor code */
  397. }
  398.  
  399. nsXmlRpcFault::~nsXmlRpcFault()
  400. {
  401.   /* destructor code */
  402. }
  403.  
  404. /* readonly attribute PRInt32 faultCode; */
  405. NS_IMETHODIMP nsXmlRpcFault::GetFaultCode(PRInt32 *aFaultCode)
  406. {
  407.     return NS_ERROR_NOT_IMPLEMENTED;
  408. }
  409.  
  410. /* readonly attribute string faultString; */
  411. NS_IMETHODIMP nsXmlRpcFault::GetFaultString(char * *aFaultString)
  412. {
  413.     return NS_ERROR_NOT_IMPLEMENTED;
  414. }
  415.  
  416. /* void init (in PRInt32 faultCode, in string faultString); */
  417. NS_IMETHODIMP nsXmlRpcFault::Init(PRInt32 faultCode, const char *faultString)
  418. {
  419.     return NS_ERROR_NOT_IMPLEMENTED;
  420. }
  421.  
  422. /* string toString (); */
  423. NS_IMETHODIMP nsXmlRpcFault::ToString(char **_retval)
  424. {
  425.     return NS_ERROR_NOT_IMPLEMENTED;
  426. }
  427.  
  428. /* End of implementation class template. */
  429. #endif
  430.  
  431.  
  432. #endif /* __gen_nsIXmlRpcClient_h__ */
  433.